package org.appcelerator.mq {
	public class Listener {
		private var m_handle:String;
		private var m_scope:String;
		private var m_pattern:Object;
		private var m_callback:Function;
		
		//Constructor - pattern can be either a String or RegExp
		public function Listener(pattern:Object, callback:Function, handle:String=null, scope:String="default") {
			this.m_handle = handle;
			this.m_scope = scope;
			this.m_pattern = pattern;
			this.m_callback = callback;
		}
		
		//Get handle
		public function get handle():String {
			return this.m_handle;
		}
		
		//Get/set scope
		public function get scope():String {
			return this.m_scope;
		}
		
		public function set scope(scope:String):void {
			this.m_scope = scope;
		}
		
		//Get/set pattern
		public function get pattern():Object {
			return this.m_pattern;
		}
		
		public function set pattern(pattern:Object):void {
			this.m_pattern = pattern;
		}
		
		//Get/set callback
		public function get callback():Function {
			return this.m_callback;
		}
		
		public function set callback(callback:Function):void {
			this.m_callback = callback;
		}
	}
}